package com.devilvan.betrice.sinofinance.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.devilvan.betrice.common.BasePo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;
import java.io.Serial;
import java.io.Serializable;

/**
* @author Evad.Wu
* @Description 新浪财经-美股实时行情信息表 映射
* @date 2023-03-19
*/
@Setter
@Getter
@ToString
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "SINA_USSTOCK_QUOTES")

@Entity
@Table(name = "SINA_USSTOCK_QUOTES")
@DynamicInsert
@EntityListeners(AuditingEntityListener.class)
@Schema(description = "新浪财经-美股实时行情信息表 映射")
public class SinaUsstockQuotesPo extends BasePo implements Serializable {
    @Serial
    private static final long serialVersionUID = 7043746621365998079L;
    @Schema(description = "名称")
    @TableField(value = "CNAME")
    @Column(name = "CNAME", columnDefinition = "VARCHAR(128) NOT NULL COMMENT '名称'")
    private String cname;
    @Schema(description = "行业板块")
    @TableField(value = "CATEGORY")
    @Column(name = "CATEGORY", columnDefinition = "VARCHAR(32) COMMENT '行业板块'")
    private String category;
    @Schema(description = "代码")
    @TableField(value = "SYMBOL")
    @Column(name = "SYMBOL", columnDefinition = "VARCHAR(32) NOT NULL COMMENT '代码'")
    private String symbol;
    @Schema(description = "最新价")
    @TableField(value = "LATEST_PRICE")
    @Column(name = "LATEST_PRICE", columnDefinition = "DOUBLE(18,2) COMMENT '最新价'")
    private Double latestPrice;
    @Schema(description = "涨跌额")
    @TableField(value = "DIFF")
    @Column(name = "DIFF", columnDefinition = "DOUBLE(18,2) COMMENT '涨跌额'")
    private Double diff;
    @Schema(description = "涨跌幅")
    @TableField(value = "CHG")
    @Column(name = "CHG", columnDefinition = "DOUBLE(18,2) COMMENT '涨跌幅'")
    private Double chg;
    @Schema(description = "昨收")
    @TableField(value = "PRECLOSE")
    @Column(name = "PRECLOSE", columnDefinition = "DOUBLE(18,2) COMMENT '昨收'")
    private Double preclose;
    @Schema(description = "今开盘")
    @TableField(value = "OPEN")
    @Column(name = "OPEN", columnDefinition = "DOUBLE(18,2) COMMENT '今开盘'")
    private Double open;
    @Schema(description = "最高价")
    @TableField(value = "HIGH_PRICE")
    @Column(name = "HIGH_PRICE", columnDefinition = "DOUBLE(18,2) COMMENT '最高价'")
    private Double highPrice;
    @Schema(description = "最低价")
    @TableField(value = "LOW_PRICE")
    @Column(name = "LOW_PRICE", columnDefinition = "DOUBLE(18,2) COMMENT '最低价'")
    private Double lowPrice;
    @Schema(description = "振幅")
    @TableField(value = "AMPLITUDE")
    @Column(name = "AMPLITUDE", columnDefinition = "VARCHAR(8) COMMENT '振幅'")
    private String amplitude;
    @Schema(description = "成交量")
    @TableField(value = "VOLUME")
    @Column(name = "VOLUME", columnDefinition = "DOUBLE(18,2) COMMENT '成交量'")
    private Double volume;
    @Schema(description = "市值")
    @TableField(value = "MKTCAP")
    @Column(name = "MKTCAP", columnDefinition = "DOUBLE(18,2) COMMENT '市值'")
    private Double mktcap;
    @Schema(description = "市盈率")
    @TableField(value = "PE")
    @Column(name = "PE", columnDefinition = "DOUBLE(12,8) COMMENT '市盈率'")
    private Double pe;
    @Schema(description = "上市地")
    @TableField(value = "MARKET")
    @Column(name = "MARKET", columnDefinition = "VARCHAR(16) COMMENT '上市地'")
    private String market;
}
